package ToYesterday.Day16_searchF;

import org.junit.Test;

public class TestSecond {
    @Test
    public void test(){
        int [] ints = {3,4,3,2,1};
        System.out.println(findPeakElement(ints));
    }
    public int findPeakElement(int[] nums) {
        int t = 0;
        for (int j=0;j<nums.length;j++){
            if (nums[t]<nums[j])t=j;
        }
        return t;

    }

}
